import request from '@/utils/request'

// 查询运算规则列表
export function listEnergyCaculatedRule(query) {
  return request({
    url: '/app/energyCaculatedRule/list',
    method: 'get',
    params: query
  })
}

// 查询运算规则详细
export function getEnergyCaculatedRule(ruleId) {
  return request({
    url: '/app/energyCaculatedRule/' + ruleId,
    method: 'get'
  })
}

// 新增运算规则
export function addEnergyCaculatedRule(data) {
  return request({
    url: '/app/energyCaculatedRule',
    method: 'post',
    data: data
  })
}

// 修改运算规则
export function updateEnergyCaculatedRule(data) {
  return request({
    url: '/app/energyCaculatedRule',
    method: 'put',
    data: data
  })
}

// 删除运算规则
export function delEnergyCaculatedRule(ruleId) {
  return request({
    url: '/app/energyCaculatedRule/' + ruleId,
    method: 'delete'
  })
}
